import request from '@/config/axios'

//获取列表
export const getMaterialPage = (params) => {
  return request.getOriginal({
    url: '/amp/material-message/page',
    params
  })
}

// 查询材料详情
export const getMaterial = (id: number) => {
  return request.get({ url: '/amp/material-message/get?id=' + id })
}

// 新增材料
export const createMaterial = (data) => {
  return request.post({ url: '/amp/material-message/create', data: data })
}

// 修改材料
export const updateMaterial = (params) => {
  return request.put({ url: '/amp/material-message/update', data: params })
}

// 删除材料
export const deleteMaterial = (id: number[]) => {
  return request.delete({ url: '/amp/material-message/delete?id=' + id })
}
